var bgW = $(window).width();
bgW = 640;
var bgH = $(window).height();
var state = $.cookie("state");
var openid = $.cookie("openid");
var id = $.cookie("id");
var shengyin = document.getElementById("shengyin");
var music = false;
$(function() {
	if(openid=="" || openid==null)
	{
//		location.href = encodeURI("fabu.html");
	}
//	$("#bg,#lastimg,#video1,#canvas").attr({
//		"width": bgW,
//		"height": bgH
//	});
//	$("#gameView").attr({
//		"width": bgW,
//		"height": bgH
//	});
	if(bgH<960)
	{
		bgH = 960;
	}
	$(".zhezhao").css({"width":bgW,"height":bgH})
	$(".bg_yuansu").css({"top":(bgH-1036)/2});
	try {
		var image1 = "http://www.jkera.cn/geer/image/share.jpg";
		var url1 = "http://www.jkera.cn/geer/index.html";
		fenxiang("来自未来的一封邀请函","来自未来的一封邀请函", "来自未来的一封邀请函", url1, image1, openid);
	} catch(err) {
	}
	
	var yinyue = function() {
		if(music == false) {
			$("#tubiao").attr("src","image/play.png");
			music = true;
			bgmp3.play();
		} else {
			$("#tubiao").attr("src","image/stop.png")
			music = false;
			bgmp3.pause();
		}
	}
	$("#tubiao").click(function() {
		yinyue();

	})

})